package com.list01.example01;

import java.lang.annotation.ElementType;
import java.util.Scanner;

public class UserTest {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你的用户名");
        String userName = scanner.next();
        System.out.println("请输入你的密码：");
        String password = scanner.next();
        User user = new User();
        boolean res = user.login(userName, user.password);
        if (res){
            System.out.println("登录成功，欢迎"+ userName);
        }else {
            System.out.println("登录失败，用户名或者密码错误！");
        }
    }


}
